// Header file of AST
// those functions that have been defined in our A3 has been added in. More public functions could still be added in
#ifndef AST_H
#define AST_H

#include "TNode.h"
#include <iostream>
#include <vector>
using namespace std;

class AST{
public:
	AST();
	AST(TNode);
	TNode createNode(TYPE,int);
	TNode createNode(TYPE, TNode);
	vector<TNode> getChildren(TNode);
	TNode getParent(TNode);
	void setChildren(TNode&, TNode);
	vector<TNode> findPattern(TNode);
	vector<TNode> findPattern(TNode,TNode);
	TNode getRoot();
	void setRoot(TNode);
	void setCurNode(TNode);
	TNode* getCurNode();

private:
	TNode root;
	TNode* curNode;
};

#endif